home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ WinXP Shutdown UI 1.xpl < prev    next >
Text File  |  2003-12-10  |  2KB  |  54 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="1"
  4. "UIPATH 1"="Startup/Shutdown\Shutdown\Windows NT/2K/XP\00) Shutdown Menu"
  5. "NAME"="Windows XP Shutdown Reason"
  6. "VERSION"="1.01"
  7. "OSVERSION"="0000011"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Enabled Shutdown Reason UI"
  10. "DESCRIPTION 1"="This option, if enabled, prompts the user for a reason why the computer is shut down. This information must be provided before the computer can be shut down and will be logged into the event log."
  11. "DESCRIPTION 2"="This can be used if this computer will be used as a sort of server and you want to know who has shut down it and why."
  12. "AUTHOR"="Xteq Systems"
  13. "CONTACTURL"="http://www.xteq.com"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="Thanks to Alexander Khoroshev <aelric@atnet.ru> for the bug notice!"
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. sP="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Reliability\ShutdownReasonUI"
  24.  
  25. Sub Plugin_Initialize 
  26.   i=RegReadValue(sP)
  27.   if i=1 then SetUIElement 1,true
  28.  
  29.   'it is enabled by default on 2003 machines! 
  30.   if RegValueExists(sP)=false and GetOSVersion=7 then SetUIElement 1,true
  31. End Sub
  32.  
  33. Sub Plugin_CheckData(ElementIndex)
  34. End Sub
  35.  
  36. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  37.  b=GetUIElement(1)
  38.  if b=true then
  39.     Call RegWriteValue(sp,1,2)
  40.  else
  41.    Call RegWriteValue(sp,0,2)
  42. '    if RegValueExists(sP) then
  43. '       Call RegDeleteValue(sP)
  44. '    end if
  45.  end if
  46.  
  47. End Sub
  48.  
  49. Sub Plugin_Terminate 
  50. End Sub
  51.  
  52.  
  53.  
  54.